<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#import "/common/page.ftl" as p>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${this[0].getText("project_name")}</title>
<link type="text/css" href="${base}/static/css/style.css" rel="stylesheet" rev="stylesheet" />
<link rel="stylesheet" type="text/css" href="${base}/static/js/validate/css/screen.css" />


<script type="text/javascript" src="${base}/static/js/jquery.js"></script>
<script type="text/javascript" src="${base}/static/js/calendar/WdatePicker.js"></script>
<script type="text/javascript" src="${base}/static/js/validate/validate.js"></script>
<script type="text/javascript" src="${base}/static/js/validate/cmxforms.js"></script>
</head>
<body>

<div class="main_content" style="display:block">
<br/>
<h2>待审核单位列表</h2>
<form id="form1" action='${base}/produce/audit/waiting' method='post'>
	<a href="${base}/produce/audit/waiting">待审核</a>&nbsp;&nbsp;&nbsp;
	<a href="${base}/produce/audit/checked">已审核</a>
    <table cellspacing="0" class="datalist" style="width:60%">
    	<tr>
			<th width='60%'>申报单位</th>
    		<th width='20%'>申报日期</th>
    		<th width='20%'>审核状态</th>
    	</tr>	
		<#if page.items?size == 0>
		<tr><td colspan="3" style="text-align:center;"><font color="red">暂时没有需要审核企业登记</font></td></tr>	
		</#if> 	 
		<#list page.items as d>
		<tr>
			<td><a href="#"><a href="${base}/declaration/view?dec.id=${d.id!}">${d.name!}</a></td>
    		<td>${d.createdTime?string("yyyy-MM-dd")}</td>
    		<td><a href="#" onclick="showaudit('${d.id}')"><@status d.status /></a></td>
    	</tr>
		<tr id="audit_${d.id}" style="display:none;">
			<td colspan="3">
				<table class="datalist" style="width:100%">
					<#list d.audits as audit>
					<tr>
						<td>${audit.auditcmmt!}</td>
						<td>${audit.auditdate?string("yyyy-MM-dd")}</td>
						<td>${audit.auditor!}</td>
					</tr>
					</#list>
				</table>
			</td>
    	</tr>		 
		</#list>
    </table>
    <@p.pageView 'form1'/>
</form>
</div>
<#macro status value>
  <#if value==1>
     提交审核
  <#elseif value==2>
     县、区审核通过
  <#elseif value==-2>
     县、区审核未通过
  <#elseif value==3>
     市级审核通过
  <#elseif value==-3>
     市级审核未通过
  <#elseif value==4>
     省级审核通过
  <#elseif value==-4>
     省级审核未通过
  </#if> 
</#macro>
<script type="text/javascript">
 function showaudit(id){
 	$('#audit_'+id).toggle();
 }

</script>
</body>
</html>
